package com.rd.student.jiaji.class4.suyan.zrrd.day05;
//获取数组最大值
public class Demo05 {
    public static void main(String[] args) {
        int[] arr ={23,25,35,35,56,78,89,3,54262,635,732,152145};
        //定义变量，保存最大值的索引
        int max =0;
        for (int i=1;i<arr.length;i++){
            if (arr[i]>arr[max]){
                max=i;//记录最大值的下标

            }
        }
        System.out.println(arr[max]);
    }
}
